This problem was given in India by the mathematician Brahmagupta in 628 in his treatise Brahma Sputa Siddhanta:
solve the Pell equation
Brahmagupta gave the smallest solution as
Weisstein, Eric W., "Brahmagupta's Problem" from MathWorld.